package top.fate.nacosconsumer.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import top.fate.nacosconsumer.client.EurekaProviderClient;
import top.fate.nacosconsumer.client.NacosProviderClient;
import top.fate.nacosconsumer.client.ProviderClient;

import javax.annotation.Resource;

/**
 * @auther:Wangxl
 * @Emile:18335844494@163.com
 * @Time:2022/6/16 14:48
 */
@RestController
public class ConsumerController {

    @Resource
    private EurekaProviderClient eurekaProviderClient;
    @Resource
    private NacosProviderClient nacosProviderClient;
    @Resource
    private ProviderClient providerClient;

    @GetMapping("getProvider")
    public String getProvider(){
        return providerClient.info();
    }

    @GetMapping("getEurekaProvider")
    public String getEurekaProvider(){
        return eurekaProviderClient.info();
    }

    @GetMapping("getNacosProvider")
    public String getNacosProvider(){
        return nacosProviderClient.info();
    }
}
